had a small bug in the code. fixed now