optimized as much i can for i am only a novice > ^ . ^ <