Finished all needed functions