Some code but it's not correct..Will try to work on it later.