added parameters and cleaned up the code
added more entry parameters