finished a while ago
made some changes and some validations