Wrote in basic functionality