first commit

wrote this functns in text editor couple of days before