Completed basic fuctionality