fixed rendering algorithm and added some new shapes