#1

implemented basic logic