написал функции
added limits on functions
zdelal zamikaniya
finished