problem solved
i heard some ticking sound coming from the distributor so i checked it and noticed that one of the plugs had come out and was resting by the distributor so i pluged it back in and the ticking sound went. so i assume that this was causing the problem. thanks for the help.