starting logic implementation - not working yet :)