Created first working functions