code was wrongly placed