some simple code written by myself