fixed bug created while testing