fixed all bugs now works normally